package top.aigoo.project01.service;

import org.springframework.web.multipart.commons.CommonsMultipartFile;
import top.aigoo.project01.entity.Shop;
import top.aigoo.project01.entity.dto.ImageHolder;
import top.aigoo.project01.entity.dto.ShopExecution;
import top.aigoo.project01.exceptions.ShopOperationException;

import java.io.File;
import java.io.InputStream;

/**
 * @Description:
 * @Author: Mr.OYSHUO.欧阳大叔  mail:1642302522@qq.com
 * @Version 1.0.0
 * @Date: 2021/8/9 0:26
 */
public interface ShopService {
    /**
     * 根据shopCondition分页返回响应店铺列表
     * @param shopCondition 商铺查询条件
     * @param pageIndex 当前页面
     * @param pageSize  每页内容大小
     * @return
     */
    public ShopExecution getShopList(Shop shopCondition, int pageIndex, int pageSize);

    /**
     * 查询指定店铺信息
     *
     * @param shopId
     * @return Shop shop
     */

    Shop getByShopId(long shopId);

    /**
     * 注册店铺信息，包括图片处理
     *
     * @param shop
     * @return ShopExecution shopExecution
     * @throws ShopOperationException
     */
    ShopExecution addShop(Shop shop, ImageHolder thumbnail) throws ShopOperationException;

    /**
     * 更新店铺信息（从店家角度）,包含对图片的处理
     *
     * @param shop    areaId  shopAddr  phone shopDesc
     * @param thumbnail
     * @return
     * @throws RuntimeException
     */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail) throws RuntimeException;
}
